
package nccloud.web.arap.amortization.action.base;

import nccloud.framework.core.exception.ExceptionUtils;
import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;

/**
* @description 基础Action
* @version ncc1.0
*/
public abstract class BaseAction implements ICommonAction {

    @Override
    public Object doAction(IRequest request) {
        try {
            // 执行
            return this.excute(request);
        } catch (Exception e) {
            ExceptionUtils.wrapException(e);
        }
        return null;
    }

    /**
    *
    * 是否处理交互式异常，默认为否
    *
    * @return
    *
    */
    protected Boolean isHandleResumeException() {
        return Boolean.FALSE;
    }

    /**
    *
    * 执行
    *
    * @param request
    * @return
    *
    */
    public abstract Object excute(IRequest request);
}
